package com.cee.auditlog.handler;

public class TransactionHandlerContext {

    private static final ThreadLocal<TransactionHandler> handlerContext = new ThreadLocal();

    public static void setHandler(TransactionHandler handler) {
        handlerContext.set(handler);
    }

    public static TransactionHandler getHandler() {
        return handlerContext.get();
    }

    public static void removeHandler() {
        handlerContext.get().clearAll();
        handlerContext.remove();
    }

}
